import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/login",
    alias: "/",
    component: () => import("../views/login/Login.vue"),
  },
  {
    path: "/layout",
    component: () => import("../views/layout/Layout.vue"),
    children: [
      {
        path: "/welcome",
        component: () => import("../views/welcome/Welcome.vue"),
      },
      {
        path: "/studentManager/product",
        component: () => import("../views/stu_manager/Product.vue"),
      },
      {
        path: "/mine",
        component: () => import("../views/mine/Mine.vue"),
      },
      {
        path: "/vipmanager/charge",
        component: () => import("../views/vip_manager/Charge.vue"),
      },
      {
        path: "/vipmanager/order",
        component: () => import("../views/vip_manager/Order.vue"),
      },
    ],
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
